<!-- 读者 -->
<script setup lang="ts">
import { defineProps } from 'vue';
const data = defineProps({
    storyRank: Object
})

</script>
<template>
    <div>
        <p><img v-if="data.storyRank!.facePic != ''" :src="data.storyRank!.facePic" alt=""><img v-else src="../assets/img/icons8-头像-96.png" alt=""></p>
        <p>{{ data.storyRank!.nickName }}</p>
        <p>{{ data.storyRank!.total }}打赏</p>
    </div>
</template>

<style scoped lang='less'>
div {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

p:nth-child(1) {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    overflow: hidden;

    img {
        width: 100%;
    }
}

p:nth-child(2) {
    max-width: 100px;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
    white-space: nowrap;
    margin-top: 8px;
}

p:nth-child(3) {
    margin-top: 6px;
    font-size: .8rem;
    color: #888;
}
</style>